package by.myteam.gonki.bo;

import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;

import by.myteam.gonki.logic.GameLogic;

public class Road implements IDrawable {

	private final int TOP_BORDER = 430;
	private final int BOTTOM_BORDER = 64;
	private final int ROAD_WIDTH = 1169;
	private final String ROAD_PNG = "graph/road.png";
	private final Image road = Toolkit.getDefaultToolkit().getImage(ROAD_PNG);

	public static final Road INSTANCE = new Road();

	private Road() {
	}

	public int getRoadWidth() {
		return ROAD_WIDTH;
	}

	@Override
	public void draw(Graphics g) {
		for (int i = 0; i < 3; i++)
			g.drawImage(road, GameLogic.INSTANCE.getRoad_X() + ROAD_WIDTH * i, 0, null);
	}

	public int getTopBorder() {
		return TOP_BORDER;
	}

	public int getBottomBorder() {
		return BOTTOM_BORDER;
	}

}
